home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / iDockport.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  4KB  |  158 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // iDockport.h
  5. //
  6. // API for I-War 2 dockport control.
  7. //
  8. // Revision control information:
  9. //
  10. // $Header: /iwar2/packages/iDockport.h 13    1/05/01 16:54 Brett $
  11. //
  12.  
  13. #include "Flux.h"
  14.  
  15. #ifdef FLUX_COMPILE
  16.  
  17. FLUX_DECLARE_EXTENSION(iDockport);
  18.  
  19. #ifdef FLUX_LIB
  20. #if _MSC_VER >= 1000
  21. #pragma comment( lib, "idockport" )
  22. #endif // _MSC_VER >= 1000
  23. #endif // FLUX_LIB
  24.  
  25. #else
  26.  
  27. // Type definitions ///////////////////////////////////////////////////////////
  28.  
  29. handle hdockport : hsubsim;
  30.  
  31. // Dependencies ///////////////////////////////////////////////////////////////
  32.  
  33. uses String, Subsim, Sim;
  34.  
  35. // Function prototypes ////////////////////////////////////////////////////////
  36.  
  37. //
  38. // iDockport.Cast
  39. //
  40. // Attempts to cast a subsim to a dockport.
  41. //
  42. prototype hdockport iDockport.Cast( hobject dockport );
  43.  
  44. //
  45. // Dockport types
  46. //
  47. enum eDockportType
  48. {
  49.     DT_All,                                // All ports including those disabled
  50.     DT_Disabled,                        // Only disabled ports
  51.     DT_Cargo,                            // Cargo pod ports
  52.     DT_CargoFreightOnly,                // The cargo freighter port
  53.     DT_Freight,                            // Freight ports (1 per station - the spewer main dockport)
  54.     DT_Fuel,                            // Fuel ports (usually 1 per station - refuel ports)
  55.     DT_Ship,                            // General ship / docking ports (was T_CommandSection)
  56.     DT_General,                            // General ports (including cargo)
  57.     DT_Universal                        // Universal (similar to the above)
  58. };
  59.  
  60. //
  61. // Dockport status
  62. //
  63. enum eDockportStatus
  64. {
  65.     // Default return value for invalid dockport handles
  66.     DS_Invalid,
  67.     DS_Free,
  68.     DS_Reserved,
  69.     DS_Used,
  70.     DS_Any
  71. };
  72.  
  73. //
  74. // int iDockport.Count
  75. //
  76. // Returns a count of the number of free dockports on a given sim of the 
  77. // given mask
  78. //
  79. prototype int iDockport.Count( hisim sim, eDockportType type, eDockportStatus status );
  80.  
  81. //
  82. // set iDockport.DockportsOfType( 
  83. //    hisim sim,
  84. //    eDockportType type,
  85. //  eDockportStatus status )
  86. //
  87. // Returns all matching dockports as a set.
  88. //
  89. prototype set iDockport.DockportsOfType( 
  90.     hisim sim, 
  91.     eDockportType type, 
  92.     eDockportStatus status );
  93.  
  94. //
  95. // set iDockport.DockportsCompatibleWith( 
  96. //    hisim sim,
  97. //    eDockportType type,
  98. //  eDockportStatus status )
  99. //
  100. prototype set iDockport.DockportsCompatibleWith( 
  101.     hisim sim,
  102.     eDockportType type,
  103.     eDockportStatus status );
  104.  
  105. //
  106. // bool iDockport.Dock( hdockport us, hdockport them )
  107. //
  108. // Docks us to them.  Both dockports must be free and unreserved.  This
  109. // function can still fail if either is shutdown in which case it returns
  110. // false.
  111. //
  112. prototype bool iDockport.Dock( hdockport us, hdockport them );
  113.  
  114. //
  115. // iDockport.Disable
  116. //
  117. // Disable the given dockport
  118. //
  119. prototype iDockport.Disable( hdockport dockport );
  120.  
  121. //
  122. // iDockport.Enable
  123. //
  124. // Enables the given dockport
  125. //
  126. prototype iDockport.Enable( hdockport dockport );
  127.  
  128. //
  129. // iDockport.SetType
  130. //
  131. // Sets a given dockport's type.
  132. //
  133. prototype iDockport.SetType( hdockport dockport, eDockportType type );
  134.  
  135. //
  136. // eDockportStatus iDockport.Status( hdockport dockport )
  137. //
  138. // Returns a dockport's status.  The return value is one of eDockportStatus
  139. // except for DS_Any.
  140. //
  141. prototype eDockportStatus iDockport.Status( hdockport dockport );
  142.  
  143. //
  144. // bool iDockport.IsType( eDockportType dockport )
  145. //
  146. prototype bool iDockport.IsType( hdockport dockport, eDockportType type );
  147.  
  148. //
  149. // bool iDockport.IsDisabled( hdockport dockport )
  150. //
  151. // Returns true if the dockport is disabled
  152. //
  153. prototype bool iDockport.IsDisabled( hdockport dockport );
  154.  
  155. // EOF ////////////////////////////////////////////////////////////////////////
  156.  
  157. #endif // FLUX_LIB
  158.